<?php
	include("seguranca.php"); // Inclui o arquivo com o sistema de segurança
	protegePagina(); // Chama a função que protege a pagina	
?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="docs-assets/ico/favicon.png">

    <title>Free Style</title>

    <!-- Bootstrap core CSS -->
    
    <link href="dist/css/bootstrap.css" rel="stylesheet">

    <!-- PARA O DATEPICKER --> 
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/datepicker.css" rel="stylesheet">       

    <!-- Custom styles for this template -->
    <link href="examples/sticky-footer-navbar/sticky-footer-navbar.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="../../docs-assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->  
      
  </head>

  <body>

    <!-- Wrap all page content here -->
    <div id="wrap">
    
	<?php include_once("menuteste.php"); ?>

      <!-- Begin page content -->
      <div class="container">

	<?php
			if (!isset($_GET['pagina']))
			{
				include ("logado.php");
			}
			else
			{
				switch($_GET['pagina'])
				{					
					case 'logoff':
					{
						include("logoff.php");
						break;
					}

					case 'sobre':
					{
						include("sobre.php");
						break;
					}

					//PERFIL
					case 'PerfilMeu':
					{
						include("PerfilMeu.php");
						break;
					}	
						
					case 'PerfilCadastrar':
					{
						include("PerfilCadastrar.php");
						break;
					}
					case 'PerfilConsultar':
					{
						include("PerfilConsultar.php");
						break;
					}				
					case 'actionUpPerfilStatus':
					{
						include("actionUpPerfilStatus.php");
						break;
					}
					case 'PerfilAlterarUsuario':
					{
						include("PerfilAlterarUsuario.php");
						break;
					}
					
					//Questionario
					case 'PerfilCadastrarQuestionario':
					{
						include("PerfilCadastrarQuestionario.php");
						break;
					}
					case 'PerfilAtualizarQuestionario':
					{
						include("PerfilAtualizarQuestionario.php");
						break;
					}
					
						
					//RH
					case 'PerfilCadastrarRH':
					{
						include("PerfilCadastrarRH.php");
						break;
					}
					case 'PerfilAtualizarRH':
					{
						include("PerfilAtualizarRH.php");
						break;
					}
					case 'PerfilConsultaRH':
					{
						include("PerfilConsultaRH.php");
						break;
					}
					case 'PerfilAlterarUsuario':
					
						
					

					// Empresa
					
					case 'PerfilCadastrarEmpresa':
					{
						include("PerfilCadastrarEmpresa.php");
						break;
					}
					case 'PerfilConsultaEmpresa':
					{
						include("PerfilConsultaEmpresa.php");
						break;
					}
						
						
					// Adm
					case 'PerfilCadastrarAdm':
					{
						include("PerfilCadastrarAdm.php");
						break;
					}
					case 'PerfilAtualizarAdm':
					{
						include("PerfilAtualizarAdm.php");
						break;
					}
					case 'PerfilConsultaAdm':
					{
						include("PerfilConsultaAdm.php");
						break;
					}				
					
					
																																																																																																																																																																																																																													
				default:
				{
					include("logado.php");
					break;
					}
				}	
			}
		?>                                   

      </div>
      
    </div>    
   
    <div id="footer">
      <div class="container">
        <p class="text-muted">&copy; Desenvolvido pela equipe <a href="http://lattes.cnpq.br/8581482237505248" target="_blank">Free Style</a></p>
      </div>
    </div>

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="https://code.jquery.com/jquery-1.10.2.min.js"></script>
    <script src="dist/js/bootstrap.min.js"></script> 
       
	<script src="-dist/js/bootstrap.js"></script>
    <script src="docs-assets/js/holder.js"></script>
    <script src="docs-assets/js/application.js"></script>


	<!-- PARA ADICIONA NOVOS CONTATOS NO MESMO CADASTRO -->
	<script type="text/javascript" src="js/aplicacao.js"></script>
    <!-- PARA O DATEPICKER -->
    <script src="js/jquery.js"></script>
    <script src="js/bootstrap-datepicker.js"></script>
	<script>
	if (top.location != location) {
    top.location.href = document.location.href ;
  }
		$(function(){
			window.prettyPrint && prettyPrint();
			$('#dp1').datepicker({
				format: 'dd-mm-yyyy'
			});
			$('#dp2').datepicker();
			$('#dp3').datepicker();
			$('#dp3').datepicker();
			$('#dpYears').datepicker();
			$('#dpMonths').datepicker();
			
			
			var startDate = new Date(2012,1,20);
			var endDate = new Date(2012,1,25);
			$('#dp4').datepicker()
				.on('changeDate', function(ev){
					if (ev.date.valueOf() > endDate.valueOf()){
						$('#alert').show().find('strong').text('The start date can not be greater then the end date');
					} else {
						$('#alert').hide();
						startDate = new Date(ev.date);
						$('#startDate').text($('#dp4').data('date'));
					}
					$('#dp4').datepicker('hide');
				});
			$('#dp5').datepicker()
				.on('changeDate', function(ev){
					if (ev.date.valueOf() < startDate.valueOf()){
						$('#alert').show().find('strong').text('The end date can not be less then the start date');
					} else {
						$('#alert').hide();
						endDate = new Date(ev.date);
						$('#endDate').text($('#dp5').data('date'));
					}
					$('#dp5').datepicker('hide');
				});

        // disabling dates
        var nowTemp = new Date();
        var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);

        var checkin = $('#dpd1').datepicker({
          onRender: function(date) {
            return date.valueOf() < now.valueOf() ? 'disabled' : '';
          }
        }).on('changeDate', function(ev) {
          if (ev.date.valueOf() > checkout.date.valueOf()) {
            var newDate = new Date(ev.date)
            newDate.setDate(newDate.getDate() + 1);
            checkout.setValue(newDate);
          }
          checkin.hide();
          $('#dpd2')[0].focus();
        }).data('datepicker');
        var checkout = $('#dpd2').datepicker({
          onRender: function(date) {
            return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
          }
        }).on('changeDate', function(ev) {
          checkout.hide();
        }).data('datepicker');
		});
	</script>
    
  </body>
</html>